package com.kedou.sdk.ui;

import android.app.Activity;

import androidx.fragment.app.FragmentActivity;

import com.kedou.sdk.IWanSDKFactory;
import com.kedou.sdk.ui.fragment.ExitAppDialogFragment;
import com.kedou.sdk.ui.view.DialogFactory;

/**
 * Created by Administrator on 2017/12/15 0015.
 */

public class JuHaoWanSDKFactory implements IWanSDKFactory {

    @Override
    public void showExitAppDialog(Activity activity, String imageUrl) {
        if (activity instanceof FragmentActivity) {
            ExitAppDialogFragment.show(((FragmentActivity) activity).getSupportFragmentManager());
        } else {
            DialogFactory.createExitAppDialog(activity, imageUrl).show();
        }
    }
}
